;;; Catch Processing setup script

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{2c5ecaa1-c662-4bb1-bcda-44ed3ec5d5c0}
AppName=CatchProcessing
AppVerName=CatchProcessing Version 1.2.1.1
AppPublisher=NOAA Fisheries
DefaultDirName={pf}\CatchProcessing
DisableDirPage=yes
DefaultGroupName=CatchProcessing
DisableProgramGroupPage=yes
OutputDir=..\..\..\InstallPacks
OutputBaseFilename=CatchProcessing-1.2.1.1
SolidCompression=yes
UsePreviousAppDir=no
ChangesEnvironment=true

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Icons]
Name: "{group}\CatchProcessing"; Filename: "{app}\CatchProcessing.exe"; WorkingDir: {app};
Name: "{commondesktop}\CatchProcessing"; Filename: "{app}\CatchProcessing.exe"; Tasks: desktopicon; WorkingDir: {app};

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "..\..\CatchProcessing\bin\Release\CatchProcessing.exe"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "..\..\CatchProcessing\bin\Release\CatchProcessing.exe.config"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "..\..\CatchProcessing\bin\Release\*.dll"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "..\..\CatchProcessing\bin\Release\*.mdb"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "..\..\CatchProcessing\bin\Release\Docs\*.*"; DestDir: "{app}\Docs"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "..\..\CatchProcessing\bin\Release\StaticData\*.*"; DestDir: "{app}\StaticData"; Flags: ignoreversion recursesubdirs createallsubdirs

[Run]
Filename: "{app}\CatchProcessing.exe"; Description: "{cm:LaunchProgram,CatchProcessing}"; Flags: nowait postinstall skipifsilent

[Code]
var
  DataDirPage: TInputDirWizardPage;

procedure InitializeWizard;
begin
  { Create the pages }


  DataDirPage := CreateInputDirPage(wpSelectDir,
    'Select Data Directory', 'Where should CatchProcessing data files be installed?',
    'Select the path to \CatchProcessing\, then click Next.',
    False, '');
  DataDirPage.Add('');

  DataDirPage.Values[0] := ExpandConstant('{commonappdata}\CatchProcessing');


end;

function GetDataDir(Param: String): String;
begin
  { Return the selected DataDir }
  Result := DataDirPage.Values[0];
end;

